MA

[Pedido] Second Promotion Por Alavanca

Por masterror, 29 de jul. de 2010 em Scripts

otserv
tibia
8
2k
masterrorM
29 de julho de 2010 às 17:54

Aew galerinha do Xtibia...

 

gostaria de algo que desse second promotion por alavanca...

 

 

HAIL XTIBIA!

VodkartV
29 de julho de 2010 às 18:16

alapromote.lua

function onUse(cid, item, frompos, item2, topos)
if item.uid == 8001 and item.itemid == 1945 then
if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then 
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid, 22, "Parabens você foi promovido.")
else
doPlayerSendCancel(cid,"Voce ja tem promotion.")
end
elseif item.uid == 8001 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)		
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end

 

actions.xml

<action actionid="8001" script="alapromote.lua" />

masterrorM
29 de julho de 2010 às 19:16

DUVIDA:é só eu meter o actionid 8001 ( ou algum a minha escolha :) ) na alavanca???

VodkartV
29 de julho de 2010 às 19:34

tem que colocar 8001 mesmo

masterrorM
29 de julho de 2010 às 20:10

mais eu nao posso mudar no Script do actions.xml??

 

ve se vc consegue me ajudar nesse http://www.xtibia.com/forum/topic/138378-pedido-npc/#entry914021

 

@@EDITD de 5min dps...

eu poderia colocar assim né?

function onUse(cid, item, frompos, item2, topos)

if item.uid == 8001 and item.itemid == 9825 then

if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then

doPlayerSetVocation(cid, getPlayerVocation(cid)+4)

doTransformItem(item.uid,item.itemid+1)

doPlayerSendTextMessage(cid, 22, "Parabens você foi promovido.")

else

doPlayerSendCancel(cid,"Voce ja tem promotion.")

end

elseif item.uid == 8001 and item.itemid == 9826 then

doTransformItem(item.uid,item.itemid-1)

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

return TRUE

end

Editado Julho 29 por Masfrii

VodkartV
29 de julho de 2010 às 20:34

8001 -- é oque vai em ACTIONID NO SEU MAPPER EDITOR

 

 

1945 -- é o ID da sua alavanca que geralmente é 1945...

masterrorM
29 de julho de 2010 às 21:01

vlws ja dei REP+

Henrique MouraH
29 de julho de 2010 às 21:05

Sanado - movido.